package lab02.test06;

public class Ladder {//梯形
    double uplength;
    double downlength;
    double high;
    double area;

    Ladder(){}
    Ladder(double uplength,double downlength,double high,double area){
        this.uplength = uplength;
        this.downlength = downlength;
        this.high = high;
        this.area = area;
    }

    public double getUplength() {
        return uplength;
    }

    public void setUplength(double uplength) {
        this.uplength = uplength;
    }

    public double getDownlength() {
        return downlength;
    }

    public void setDownlength(double downlength) {
        this.downlength = downlength;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }

    public double getArea(double uplength,double downlength,double high) {
        area= ((uplength+downlength)*high)/2;
        return area;
    }

    public void setArea(double area) {
        this.area = area;
    }
}
